package org.jeecg.modules.demo.com.kunpeng.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.com.kunpeng.entity.CommodityPrice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.com.kunpeng.vo.CommodityPriceQueryListVO;
import org.springframework.stereotype.Repository;

/**
 * @Description: 商品价目表
 * @Author: jeecg-boot
 * @Date:   2023-01-11
 * @Version: V1.0
 */
@Repository
public interface CommodityPriceMapper extends BaseMapper<CommodityPrice> {


    /**
     *模糊查询
     */
    List<CommodityPriceQueryListVO> queryListByKeyWords(Page<CommodityPriceQueryListVO>page,@Param("commodityClassification")String commodityClassification,
                                                        @Param("supplier")String supplier,@Param("keyWords")String keyWords);

    /**
     * 修改是否删除
     */
    int updateIsDelete(String id,String isDelete);

    /**
     * 根据商品名称，规格型号，供货商，商品品牌查询
     */
    List<CommodityPrice> queryListByTradeNameOrSpecificationOrSupplierOrBrand(String tradeName,String specification,String supplier,String commodityBrand);

    /**
     * 根据商品编码查询
     */
    /*List<CommodityPrice> queryListByCommodityCode(String commodityCode);*/

    /**
     * 根据商品编码查询对应的商品详情
     */
    CommodityPriceQueryListVO selectCommodityByCommodityCode(String commodityCode);

    /**
     * 采购商品列表
     */
    List<CommodityPriceQueryListVO> queryPurchaseCommodityList(Page<CommodityPriceQueryListVO>page, @Param("keyWords")String keyWords);

    /**
     * 销售商品列表
     */
    List<CommodityPriceQueryListVO> querySalesCommodityList(Page<CommodityPriceQueryListVO>page, @Param("keyWords")String keyWords);

    /**
     * 根据商品编码模糊查询
     * @param commodityCode
     * @return
     */
    List<CommodityPrice> commodityPriceListByCode(String commodityCode);
}
